#!/usr/bin/python

singer = []

def singer_push():
    a = input("please input a singer name:")
    singer.insert(0,a)
    print("singer %s is coming"%a)

def singer_pop():
    print(singer)
    if len(singer) > 0:
        b =  singer.pop()
        print("singer %s is out"%b)
    else:
        print("all singers are out")

def main():
    while 1:
        print("1.add singer")
        print("2.del singer")
        print("3.exit")
        option = input("please input your choice:")
        opt = {"1":singer_push,"2":singer_pop,"3":exit}
        if option in opt:
            opt.get(option)()
        else:
            print("input error!")
main()
